﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Device.Location;
using System.Linq;
using CapstoneWinPhone.Data;
using User = CapstoneWinPhone.Data.User;

namespace CapstoneWinPhone.ViewModels
{
    public class MainViewModel : INotifyPropertyChanged
    {
        public User User { get { return DataHolder._currentUser; } set { User = value; } }
        public ExpenseLog CurrentExpenseLog { get { return DataHolder._currentExpenseLog;} }
        public ObservableCollection<TimeStampViewModel> TimeStampItems { get; private set; } 

        public MainViewModel()
        {
        }

        public bool IsDataLoaded
        {
            get;
            private set;
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
